/*
* usage: in page head &lt;script src="/consts.js"&gt;&lt;/script&gt;
* consts(constName);
* uri(uriTemplate, arg1, arg2 ... ,argn);
*/
/*
* 参数表: 常量名称
* 返回: 常量值
*/
var im20consts = function(constName) {
    var constVal = im20consts.constData[constName];
    if (constVal) {
        return constVal;
    } else {
        alert("im20consts, no const named:" + constName);
        return "";
    }
};
/*
* 参数表: URI模板常量名称, 用来替换URI模板的1到n个值...
* 返回: URI
*/
var im20uri = function() {
    if (arguments.length == 0) alert("im20consts uri, need 1 arg at least!");
    var uriTemplate = im20consts(arguments[0]);
    for (var i = 1; i < arguments.length; i++) { // 从第二个参数开始替换
        uriTemplate = uriTemplate.replace(/{[a-z]+}/i, arguments[i]);
    }
    return uriTemplate;
};
im20consts.constData = eval({
    "INDEX_AND_CHANNEL_PAGE_LIMIT": "10",
    "BOARD_NAME_MAX_LENGTH": "20",
    "DOMAIN_TITLE": "\u77E5\u7F8E",
    "DOMAIN_SNS_TITLE": "\u77E5\u7F8E\u7F51",
    "QQT_ID": "zhimeicom",
    "SINA_ID": "\u77E5\u7F8E\u7F51\u5FAE\u535A",
    "FILTER_LOGIN_USER_ID": "loginUserId",
    "FILTER_LOGIN_USER": "loginUser",
    "FILTER_LOGIN_USER_PROFILE": "loginUserProfile",
    "FILTER_BACKEND_LOGIN_USER": "backendUserName",
    "SYNC_SHARE": "1",
    "SYNC_LIKE": "2",
    "SYNC_SHARE_TO": "3",
    "SYNC_INVITE": "4",
    "SYNC_REGIST": "5",
    "JAVASCRIPT_CONSTS_NAME": "im20consts",
    "BOARD_COUNT_LIMIT": "30",
    "BOARD_PIC_SHARE_TYPE_SHARE": "1",
    "BOARD_PIC_SHARE_TYPE_QUESTION": "2",
    "BOARD_PIC_COMMENT_QUESTION_TYPE_O": "1",
    "BOARD_PIC_COMMENT_QUESTION_TYPE_X": "2",
    "BOARD_PIC_COMMENT_QUESTION_TYPE_N": "3",
    "FLAG_NORMAL": "1",
    "FLAG_DELETED": "5",
    "FLAG_AUDIT_PASSED": "1",
    "FLAG_AUDIT_PENDING": "2",
    "FLAG_AUDIT_DELETED": "5",
    "BOARD_PIC_COMMENT_LIMIT": "5",
    "BOARD_MANAGE_TYPE_SELF": "1",
    "BOARD_MANAGE_TYPE_MULTI": "2",
    "PAGE_SIZE_10": "10",
    "PAGE_LEFTRIGHT_NUNMBER": "2",
    "PAGE_SIZE_12": "12",
    "PAGE_SIZE_16": "16",
    "REGIST_TYPE_IM": "0",
    "REGIST_TYPE_SYNC": "1",
    "REGIST_TYPE_EXT": "2",
    "REGIST_TYPE_STATION": "3",
    "REGIST_TYPE_STATION_GET": "4",
    "OPEN_CACHE_EXPIRE": "1800",
    "OPENPLATFORM_RENREN": "1",
    "SYNC_SHARE_SNS_DATA": "3600",
    "SYNC_SHARE_RENREN_TIMER": "1",
    "OPENPLATFORM_SINA": "2",
    "SYNC_SHARE_SINA_TIMER": "1",
    "OPENPLATFORM_QZONE": "3",
    "SYNC_SHARE_QZONE_TIMER": "1",
    "OPENPLATFORM_QQT": "4",
    "SYNC_SHARE_QQT_TIMER": "1",
    "HREF_INVITE": "5",
    "EMAIL_INVITE": "6",
    "USER_SHARE": "7",
    "USER_SHARE_TITLE_MAX": "40",
    "USER_FIND_EMAIL_COUNT": "3",
    "USER_FIND_EMAIL_DATA": "86400",
    "USER_FIND_EMAIL_EXPIRED": "24",
    "OPENPLATFORM_QQT_IMAGES": "180",
    "PAGE_SIZE_24": "24",
    "PAGE_SIZE_5": "5",
    "PAGE_SIZE_30": "30",
    "BOARD_MANAGER_PRIVILEGE_OWNER": "1",
    "BOARD_MANAGER_PRIVILEGE_MANAGER": "2",
    "SEARCH_TYPE_HOT": "1",
    "CATALOG_DEFAULT": "0",
    "COUNT_TYPE_LIKE": "1",
    "COUNT_TYPE_RESHARE": "2",
    "COUNT_TYPE_COMMENT": "3",
    "COUNT_TYPE_VIEW": "4",
    "COUNT_TYPE_SYNC": "5",
    "COUNT_TYPE_SHOW": "6",
    "GENDER_MAN": "1",
    "GENDER_WOMAN": "2",
    "FORM_USER_NAME_LENGHT": "4",
    "DOMAIN": "zhimei.com",
    "DOMAIN_URI": "http://www.zhimei.com",
    "IMAGE_PREFIX": "http://b.zhimei.com",
    "IMAGE_PREFIX_ORIGINAL": "/data/web/b.imimg.cn",
    "CSS_PREFIX": "http://a.zhimei.com/r4252",
    "IMAGE": "http://b.zhimei.com/{file}",
    "FAV_ICON": "/favicon.ico",
    "SHARE_DOMAIN_LOGO": "/r4252/images/logo.gif",
    "PIN_REGIST_PAGE": "/pin/register",
    "PIN_LOGIN_PAGE": "/pin/login",
    "PIN_LOGIN_BIND": "/pin/bind",
    "PIN_SUCCESS": "/pin/success",
    "LOGIN_USER_STATION": "/profile/station",
    "URI_FLASH_CROSS_DOMAIN": "/crossdomain.xml",
    "URI_JAVASCRIPT_CONSTS": "/consts.js",
    "URI_AJAX_NEED_LOGIN": "/ajaxLoginFailed",
    "URI_AJAX_EXCEPTION": "/ajaxException",
    "URI_JAVASCRIPT_CONSTS_JSP": "/consts",
    "URI_USER_AJAX": "/user/{userId}",
    "URI_LOGIN": "/login",
    "URI_LOGOUT": "/logout",
    "URI_REGIST": "/regist",
    "URI_USER_BINDING": "/login/binding",
    "URI_REGIST_EMAIL": "/regist/email",
    "URI_REGIST_NICKNAME": "/regist/nickname",
    "URI_KAPTCHA": "/kaptcha.jpg",
    "URI_CAPTCHA": "/captcha/image.html",
    "URI_CAPTCHA_CHECK": "/captcha/check",
    "URI_USER": "/profile/{boardUserId}",
    "URI_USER_INFO_UPDATE": "/profile/info",
    "URI_USER_PASSWORD_UPDATE": "/profile/password",
    "URI_USER_FIND_PASSWORD": "/profile/findPassword",
    "URI_USER_FIND_PASSWORD_UPDATE": "/profile/findPassword/update",
    "URI_USER_FIND_PASSWORD_ENTRY": "/profile/findPassword/{param}",
    "URI_USER_OPEN_SYNC": "/profile/sync",
    "PROFILE_INVITE_PAGE": "/reg/{inviteurl}",
    "USER_SHARE_ENTRY": "/share/entry/{stat}",
    "URI_USER_CONCERNS_DEL": "/profile/concerns/delete",
    "URI_USER_CONCERNS_POST": "/profile/concerns/post",
    "URI_USER_PROFILE_WIDGET": "/widget/profile/{userId}",
    "URI_USER_PROFILE_WIDGET_BOARD": "/widget/profile/{userId}/{boardId}",
    "URI_USER_PROFILE_WIDGET_MEDIUM": "/widget/profilem/{userId}",
    "URI_USER_PROFILE_WIDGET_BAR": "/widget/profilebar/{userId}",
    "URI_USER_PROFILE_WIDGET_BAR_BOARD": "/widget/profilebar/{userId}/{boardId}",
    "URI_BOARD_WIDGET_BAR": "/widget/board/{boardId}",
    "URI_BOARD_CATEGORY_LIST": "/boardcategory",
    "URI_BOARD": "/board/{userId}/{boardId}",
    "URI_BOARD_LIST_AJAX": "/boardAjax/{boardUserId}/list",
    "URI_BOARD_POSITION_AJAX": "/boardAjax/position",
    "URI_DELETE_BOARD_AJAX": "/boardAjax/{boardId}",
    "URI_SAVE_BOARD_AJAX": "/saveBoardAjax/{boardId}",
    "URI_UPDATE_BOARD_CATEGORY": "/updateBoardCategoryAjax/{boardId}",
    "URI_BOARD_MANAGER_AJAX": "/boardManagerAjax/{boardId}",
    "URI_BOARD_PIC_LIST": "/board/{userId}/{boardId}/{page}",
    "URI_SHARE_PIC_LIST": "/shares/{userId}",
    "URI_SHARE_PIC_LIST_AJAX": "/sharesAjax/{userId}/{page}",
    "URI_BOARD_LIST_OF_LOGINUSER": "/boards",
    "URI_BOARD_LIST": "/boards/{userId}",
    "URI_ADD_BOARD": "/board/{userId}",
    "URI_BOARD_PIC_AJAX": "/shareAjax/{boardPicId}",
    "URI_BOARD_PIC": "/share/{boardPicId}",
    "URI_SHARE_BOARD_PIC": "/share/",
    "URI_PIN_BOARD_PIC": "/pin/board",
    "URI_PIN_BOARD_PIC_LIST": "/pin/board/{type}",
    "URI_BOARD_PIC_RESHARE": "/reshare/{boardPicId}",
    "URI_BOARD_PIC_RESHARES": "/reshares/{boardPicId}",
    "URI_ADD_BOARD_PIC_COMMENT": "/comment/{boardPicId}",
    "URI_ADD_BOARD_PIC_COMMENT_AGREE": "/comment/{boardPicCommentId}/agree",
    "URI_GRAPHICS_PROFILE": "/graphics/profile",
    "URI_GRAPHICS_SHARE": "/graphics/share",
    "URI_RENREN_LOGIN": "/login/renren",
    "URI_RENREN_GET": "/login/renren/return",
    "URI_RENREN_GET_FRIEND": "/login/renren/friends",
    "URI_SINA_LOGIN": "/login/sina",
    "URI_SINA_GET": "/login/sina/return",
    "URI_QQT_LOGIN": "/login/qqt",
    "URI_QQT_GET": "/login/qqt/return",
    "URI_SNS_CHECK": "/sns/check",
    "URI_QQT_SEND_T": "/qqt/send/t",
    "URI_GET_USER_SYNC": "/user/sync/{userId}",
    "URI_USER_SYNC": "/user/sync",
    "URI_USER_SHARE": "/user/share",
    "URI_FANS_FRIENDS": "/friends/{userId}/{page}",
    "URI_FANS_FRIENDS_AJAX": "/friendsAjax/{userId}",
    "URI_FANS_FOLLOWEDS_AJAX": "/followedsAjax/{userId}",
    "URI_FANS_EXIT_MANAGE_AJAX": "/exitmanage/{boardUserId}/{boardId}",
    "URI_FANS_FOLLOWED_USER": "/follow/{userId}/{page}",
    "URI_FANS_USER_FANS": "/fans/{userId}/{page}",
    "URI_FANS_ADD_FRIEND": "/fansfriend/{userId}",
    "URI_FANS_USER_FIND": "/fansFind",
    "URI_FOLLOWED_USER_FIND": "/followedFind",
    "URI_FRIEND_USER_FIND": "/friendFind",
    "URI_FANS_BOARD_FANS": "/fans/{boardId}/{boardUserId}",
    "URI_FANS_ADD_FOLLOW_USER": "/user/{followedUserId}/follow",
    "URI_FANS_UNFOLLOW_USER": "/user/{followedUserId}/unfollow",
    "URI_FANS_ADD_FOLLOW_BOARD": "/board/{boardUserId}/{boardId}/follow",
    "URI_FANS_ADD_FOLLOW_BOARD_WITHOUT_USER": "/board/{boardId}/follow",
    "URI_FANS_UNFOLLOW_BOARD": "/board/{boardUserId}/{boardId}/unfollow",
    "URI_FANS_UNFOLLOW_BOARD_WITHOUT_USER": "/board/{boardId}/unfollow",
    "URI_ADD_BOARD_PIC_COMMENT_LIST": "/comment/{boardPicId}/{page}",
    "URI_ADD_LIKE_AJAX": "/share/{boardPicId}/likeAjax",
    "URI_ADD_UNLIKE_AJAX": "/share/{boardPicId}/unlikeAjax",
    "URI_ADD_LIKE": "/share/{boardPicUserId}/like",
    "URI_UNLIKE": "/share/{boardPicUserId}/unlike",
    "URI_LIKE": "/likes/{likeUserId}",
    "URI_LIKE_LIST": "/likes/{likeUserId}/{page}",
    "URI_NOTIFICATION": "/notification",
    "URI_NOTIFICATION_AJAX": "/notification/ajax/{page}",
    "URI_NOTIFICATION_COUNT": "/notification/count",
    "URI_UNREAD_NOTIFICATION_COUNT": "/notification/unreadCount",
    "URI_MESSAGE": "/message",
    "URI_INVITE_EMAIL": "/invite/email",
    "URI_INVITE_CHECK": "/invite/check",
    "URI_INVITE_GET_INVITE": "/invite/get",
    "URI_EMAIL_MODEL": "/invite/emailmodel/{inviteurl}",
    "URI_INVITE": "/invite",
    "URI_MESSAGE_DETAIL_DEL": "/message/detail",
    "URI_REPLY_MESSAGE": "/message/reply",
    "URI_MESSAGE_AJAX": "/message/ajax/{page}",
    "URI_MESSAGE_DETAIL": "/message_detail/{messageSessionId}/{toUserId}",
    "URI_MESSAGE_DETAIL_AJAX": "/message_detail/ajax/{page}/{messageSessionId}",
    "URI_MESSAGE_COUNT": "/message/count",
    "URI_UNREAD_MESSAGE_COUNT": "/message/unreadCount",
    "URI_MESSAGE_AND_NOTIFY": "/index_message_count",
    "URI_CHANNEL_INDEX": "/",
    "URI_CHANNEL_INDEX_INDEX": "/index",
    "URI_CHANNEL_INDEX_CATALOG": "/index/{catalog}",
    "URI_CHANNEL_INDEX_CATALOG_PAGE": "/index/{catalog}/{page}",
    "URI_CHANNEL_HOT": "/hot/",
    "URI_CHANNEL_HOT_CATALOG": "/hot/{catalog}",
    "URI_CHANNEL_HOT_CATALOG_PAGE": "/hot/{catalog}/{page}",
    "URI_CHANNEL_ALL": "/all/",
    "URI_CHANNEL_ALL_CATALOG": "/all/{catalog}",
    "URI_CHANNEL_ALL_CATALOG_PAGE": "/all/{catalog}/{page}",
    "URI_CHANNEL_QUES": "/ques/",
    "URI_CHANNEL_QUES_CATALOG": "/ques/{catalog}",
    "URI_CHANNEL_QUES_CATALOG_PAGE": "/ques/{catalog}/{page}",
    "URI_HELP": "/help",
    "URI_POLICY": "/policy",
    "URI_CONTACT": "/contact",
    "URI_HELP_PIN": "/help/pin",
    "URI_SEARCH_USER": "/search/user/{page}",
    "URI_SEARCH_USER_AJAX": "/searchAjax/user/{page}",
    "URI_SEARCH_SHARE": "/search/share/{page}",
    "URI_SEARCH_SHARE_AJAX": "/searchAjax/share/{page}",
    "URI_SEARCH_BOARD": "/search/board/{page}",
    "URI_SEARCH_BOARD_AJAX": "/searchAjax/board/{page}",
    "URI_GUIDE_STEP": "/guide/step/{step}",
    "URI_GUIDE_STEP_SUCCESS": "/guide/step/success",
    "URI_GUIDE_FOLLOW_USER": "/guide/follow",
    "URI_GUIDE_ADD_BOARDS": "/guide/board",
    "URI_SYNC_BOARD_PIC": "/sync/share/{boardPicId}",
    "URI_BACKEND_BASE": "/backend",
    "URI_BACKEND_PAGE_INDEX": "/backend/index",
    "URI_BACKEND_PAGE_INDEX_MENU": "/backend/index_menu",
    "URI_BACKEND_PAGE_INDEX_BODY": "/backend/index_body",
    "URI_BACKEND_PAGE_SAMPLE_PAGE": "/backend/sample_page",
    "URI_BACKEND_OPERATION_INDEX": "/backend/operation/index",
    "URI_BACKEND_OPERATION_HOT": "/backend/operation/hot",
    "URI_BACKEND_OPERATION_NEW": "/backend/operation/new",
    "URI_BACKEND_OPERATION_HOT_ADJUST": "/backend/operation/hot/adjust",
    "URI_BACKEND_OPERATION_HOT_BOARD_PIC": "/backend/operation/hot/{boardPicId}",
    "URI_BACKEND_OPERATION_WEIGHT_USER": "/backend/operation/userWeight",
    "URI_BACKEND_OPERATION_WEIGHT_USER_UPDATE": "/backend/operation/userWeight/{userId}",
    "URI_BACKEND_OPERATION_WEIGHT_CATEGORY": "/backend/operation/categoryWeight",
    "URI_BACKEND_OPERATION_WEIGHT_BOARD": "/backend/operation/boardWeight",
    "URI_BACKEND_OPERATION_WEIGHT_BOARD_UPDATE": "/backend/operation/boardWeight/{boardId}",
    "URI_BACKEND_OPERATION_AD": "/backend/operation/ad",
    "URI_BACKEND_OPERATION_SHARE": "/backend/operation/share",
    "URI_BACKEND_AUDIT_INDEX": "/backend/audit/index",
    "URI_BACKEND_AUDIT_USER": "/backend/audit/user/{page}",
    "URI_BACKEND_AUDIT_USER_SEARCH": "/backend/audit/user/search/{page}",
    "URI_BACKEND_AUDIT_USER_FLAG": "/backend/audit/user/flag",
    "URI_BACKEND_SEND_USER_MESSAGE": "/backend/notification",
    "URI_BACKEND_AUDIT_SHARE": "/backend/audit/share",
    "URI_BACKEND_AUDIT_SHARE_SEARCH": "/backend/audit/share/search/{page}",
    "URI_BACKEND_AUDIT_SHARE_FLAG": "/backend/audit/share/flag",
    "URI_BACKEND_AUDIT_BOARD": "/backend/audit/board",
    "URI_BACKEND_AUDIT_BOARD_SEARCH": "/backend/audit/board/search/{page}",
    "URI_BACKEND_AUDIT_BOARD_FLAG": "/backend/audit/board/flag",
    "URI_BACKEND_AUDIT_BOARD_LIST": "/backend/audit/board/{page}",
    "URI_BACKEND_AUDIT_COMMENT": "/backend/audit/comment",
    "URI_BACKEND_AUDIT_COMMENT_SEARCH": "/backend/audit/comment/search/{page}",
    "URI_BACKEND_AUDIT_COMMENT_FLAG": "/backend/audit/comment/flag",
    "URI_BACKEND_AUDIT_MESSAGE": "/backend/audit/message",
    "URI_BACKEND_STAT_INDEX": "/backend/stat/index",
    "URI_BACKEND_STAT_UGC": "/backend/stat/ugc",
    "URI_BACKEND_STAT_UGC_CREATE_SHARE": "/backend/stat/ugc/createShare",
    "URI_BACKEND_STAT_UGC_RE_SHARE": "/backend/stat/ugc/reshare",
    "URI_BACKEND_STAT_UGC_COMMENT": "/backend/stat/ugc/commeont",
    "URI_BACKEND_STAT_LOGIN": "/backend/stat/login",
    "URI_BACKEND_STAT_LOGIN_UV": "/backend/stat/login/uv",
    "URI_BACKEND_STAT_LOGIN_USER": "/backend/stat/login/user",
    "URI_BACKEND_STAT_SHARE": "/backend/stat/share",
    "URI_BACKEND_STAT_SHARE_CREATE": "/backend/stat/share/create",
    "URI_BACKEND_STAT_SHARE_CLICK": "/backend/stat/share/click",
    "URI_BACKEND_STAT_ACTION": "/backend/stat/action",
    "URI_BACKEND_STAT_BASIC": "/backend/stat/basic",
    "URI_BACKEND_STAT_BASIC_TOTAL_USER": "/backend/stat/basic/total",
    "URI_BACKEND_STAT_BASIC_NEW_USER": "/backend/stat/basic/new",
    "URI_BACKEND_CONFIG_INDEX": "/backend/config/index",
    "URI_BACKEND_CONFIG_CONTEXT": "/backend/config/context",
    "URI_BACKEND_CONFIG_EMAIL": "/backend/config/email",
    "URI_BACKEND_CONFIG_HOT_FUNCTION": "/backend/config/hot",
    "URI_BACKEND_CACHE_INDEX": "/backend/cache/index",
    "URI_BACKEND_CACHE_MEMCACHED": "/backend/cache/mem",
    "URI_BACKEND_CACHE_DB": "/backend/cache/db",
    "URI_BACKEND_ADMIN_INDEX": "/backend/admin/index",
    "URI_BACKEND_ADMIN_ADD": "/backend/admin/add",
    "URI_BACKEND_ADMIN_ROLE": "/backend/admin/role",
    "URI_BACKEND_ADMIN_ADD_ROLE": "/backend/admin/addrole",
    "URI_BACKEND_ADMIN_PRIVILEDGE": "/backend/admin/pri",
    "URI_BACKEND_ADMIN_LOGIN": "/backend/admin/login",
    "URI_BACKEND_ADMIN_LOGOUt": "/backend/admin/logout",
    "URI_BACKEND_SYSTEM_KEYWORD": "/backend/system/keyword"
});
var consts = im20consts;
var uri = im20uri;